<?php $this->placeholder('onReady')->captureStart() ?>

$('.ira').button({
            icons: {
                primary: "ui-icon-link"
}});
$('.aprobar').button({
            icons: {
                primary: "ui-icon-check"
}});


$('.rechazar').button({
            icons: {
                primary: "ui-icon-trash"
}});



$("a.cambiar").click(function () {
    var textara=$('#textarea').val('')
    var id=this.id
    
    var aux=id.split('-');
    var orignal_id=aux[1];
    
    $('#dialog').html(textara)
    .dialog({buttons: {
        "Cancelar": function() {
            $('#dialog').dialog('close');
        },
        "Continuar": function() {
           var notas=$('#textarea').val()
           $.post('/comite-cambios/aceptacion',{id:id,notas:notas},function(data){            
                if(data.status=='ok'){
                      $('#fila_'+orignal_id).hide();
                    $('#dialog').dialog('close');
                }else{
                    alert('Ha ocurrido un error inesperado.');
                }
           })
        }
    }
    })
    .dialog('open').dialog({'title':'Comentarios'});;

})




    
    $('input[name=fecha_peticion_cambio]').daterangepicker().click(function () {
		 var pos = $('input[name=fecha_peticion_cambio]').offset();
         $('.ui-daterangepickercontain').css('top',pos.top+21).css('left',pos.left)
	})
    
    
    
    
   
    
    
 
    
    
    
 
<?php $this->placeholder('onReady')->captureEnd() ?>

<?$this->headScript()->offsetSetFile(100,$this->baseUrl('js/jquery.lightbox.js'));?>
<?$this->headScript()->offsetSetFile(101,$this->baseUrl('js/daterangepicker.jQuery.js'));?>


<?$this->headLink()->appendStylesheet($this->baseUrl('css/lightbox.css'));?>
<?$this->headLink()->appendStylesheet($this->baseUrl('css/ui.daterangepicker.css'));?>

<style>
 li.lipadre{width: 90%}
 
 .boton_decision{float:right}
</style>
<script>

function comite()
{
   
}

</script>

<?php echo $this->anchor($this->controllerName.'/insertar','Añadir Propuesta',array('class'=>'utiladd'));?>


<?php echo $this->msg($this->translate('%s Peticiones',count($this->rows)),'head',null,false);?>


<?php echo $this->partialLoop($this->controllerName.'/fila_propuesta.phtml', (array)$this->rows); ?>

<div style="display: none;">
<textarea cols="60" rows="5" id="textarea"></textarea>
</div>

</div>